From d04aa068689024909630ab844034daab533c791e Mon Sep 17 00:00:00 2001
From: q66 <q66@chimera-linux.org>
Date: Tue, 24 Jan 2023 18:47:00 +0000
Subject: [PATCH] fix shift overflows in gnome-desktop

---
 libgnome-desktop/gnome-bg.c          | 6 +++---
 libgnome-desktop/gnome-bg/gnome-bg.c | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/libgnome-desktop/gnome-bg.c b/libgnome-desktop/gnome-bg.c
index c890d24..c63c104 100644
--- a/libgnome-desktop/gnome-bg.c
+++ b/libgnome-desktop/gnome-bg.c
@@ -697,9 +697,9 @@ draw_color_area (GnomeBG *bg,
 	switch (bg->color_type) {
 	case G_DESKTOP_BACKGROUND_SHADING_SOLID:
 		/* not really a big deal to ignore the area of interest */
-		pixel = ((int) (0.5 + bg->primary.red * 255) << 24)      |
-			((int) (0.5 + bg->primary.green * 255) << 16)    |
-			((int) (0.5 + bg->primary.blue * 255) << 8)      |
+		pixel = ((guint) (0.5 + bg->primary.red * 255) << 24)      |
+			((guint) (0.5 + bg->primary.green * 255) << 16)    |
+			((guint) (0.5 + bg->primary.blue * 255) << 8)      |
 			(0xff);
 		
 		gdk_pixbuf_fill (dest, pixel);
diff --git a/libgnome-desktop/gnome-bg/gnome-bg.c b/libgnome-desktop/gnome-bg/gnome-bg.c
index 22b573d..a3b018d 100644
--- a/libgnome-desktop/gnome-bg/gnome-bg.c
+++ b/libgnome-desktop/gnome-bg/gnome-bg.c
@@ -696,9 +696,9 @@ draw_color_area (GnomeBG *bg,
 	switch (bg->color_type) {
 	case G_DESKTOP_BACKGROUND_SHADING_SOLID:
 		/* not really a big deal to ignore the area of interest */
-		pixel = ((int) (0.5 + bg->primary.red * 255) << 24)      |
-			((int) (0.5 + bg->primary.green * 255) << 16)    |
-			((int) (0.5 + bg->primary.blue * 255) << 8)      |
+		pixel = ((guint) (0.5 + bg->primary.red * 255) << 24)      |
+			((guint) (0.5 + bg->primary.green * 255) << 16)    |
+			((guint) (0.5 + bg->primary.blue * 255) << 8)      |
 			(0xff);
 		
 		gdk_pixbuf_fill (dest, pixel);
-- 
2.34.1

